{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "2b785401",
   "metadata": {},
   "source": [
    "------\n",
    "* 学习人： 周晓源\n",
    "* 时间：2021年12月6日\n",
    "* week15\n",
    "* 学习线上资源：[python官方文档](https://docs.python.org)\n",
    "------"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "76702c56",
   "metadata": {},
   "source": [
    "# 上周回顾\n",
    " \n",
    " ## 函数的定义：def\n",
    " \n",
    " ## 函数名的定义规则-->变量名一样的规则\n",
    " \n",
    " ## 调用函数的方式\n",
    " \n",
    " ## 参数：\n",
    " > 形参（定义函数），实参（调用函数）\n",
    " > 多个函数时：\n",
    " >> 位置函数、关键字参数（关键字参数均放在末位，多个不考虑顺序）、默认参数（默认参数均放在末位，多个不考虑顺序）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f50ba2a9",
   "metadata": {},
   "source": [
    "# 本周知识\n",
    "1. 函数的返回值\n",
    "2. 函数的参数类型\n",
    "> 1. 函数输入的参数\n",
    "> 2. 函数输出的返回值\n",
    "3. 模块与函数的关系\n",
    "4. 定义一个模块然后调用模块\n",
    "> 1.调用模块\n",
    "> 调用模块中的函数\n",
    "5. 模块与函数的实践"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b288fd24",
   "metadata": {},
   "source": [
    "## 函数的返回值\n",
    "\n",
    "1. 函数一定有返回值（无论是什么编程语言）\n",
    "2. 在其他的编程语言中（如c语言、Java等），返回值一定要写，不写会报错！，对于python（更高级的语言），返回值如果不写，给定默认值 None\n",
    "3. 返回值一般为函数体运行的结果（result），\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1b3123a2",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:03:00.197403Z",
     "start_time": "2021-12-06T07:03:00.180327Z"
    }
   },
   "outputs": [],
   "source": [
    "def get_formatted_name(first_name,last_name):\n",
    "    \"\"\"返回整洁的姓名\"\"\"\n",
    "    full_name = first_name + ' '+ last_name\n",
    "    # 函数的返回结果为 full_name\n",
    "    return full_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "40d9b809",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:03:01.647358Z",
     "start_time": "2021-12-06T07:03:01.640353Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sang weiwei\n"
     ]
    }
   ],
   "source": [
    "print(get_formatted_name(\"Sang\",\"weiwei\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "5da4c9a9",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:07:35.815982Z",
     "start_time": "2021-12-06T07:07:35.799720Z"
    }
   },
   "outputs": [],
   "source": [
    "def log_in(username,password):\n",
    "    \"\"\"验证登录信息\"\"\"\n",
    "    if username == \"Lihua\" and password == 123456:\n",
    "        return 1\n",
    "    else:\n",
    "        return 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "203f4415",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:07:36.596800Z",
     "start_time": "2021-12-06T07:07:36.581795Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log_in(\"Lihua\",123456)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f23e9e9f",
   "metadata": {},
   "source": [
    "## 函数的参数类型\n",
    "\n",
    "### 函数输入的参数\n",
    "1.函数可以输入复杂的参数：\n",
    "> 1. 函数参数为列表\n",
    "> 2. 函数参数为字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "ebf64dae",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:18:22.632700Z",
     "start_time": "2021-12-06T07:18:22.627294Z"
    }
   },
   "outputs": [],
   "source": [
    "def list_test(names):\n",
    "    \"\"\"测试输入参数为列表\"\"\"\n",
    "    print(names)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "f5b1dabf",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:18:59.416827Z",
     "start_time": "2021-12-06T07:18:59.405605Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['Lihua', 'Xiaofang', 'Ziqi']\n"
     ]
    }
   ],
   "source": [
    "list_test([\"Lihua\",\"Xiaofang\",\"Ziqi\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "8609988c",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:20:02.928887Z",
     "start_time": "2021-12-06T07:20:02.917727Z"
    }
   },
   "outputs": [],
   "source": [
    "def dic_person(request_header):\n",
    "    \"\"\"测试输入参数为字典\"\"\"\n",
    "    print(request_header)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "10e7c51e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:24:15.886218Z",
     "start_time": "2021-12-06T07:24:15.873261Z"
    }
   },
   "outputs": [],
   "source": [
    "httpbin_get = {\n",
    "  \"args\": {}, \n",
    "  \"headers\": {\n",
    "    \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\", \n",
    "    \"Accept-Encoding\": \"gzip, deflate\", \n",
    "    \"Accept-Language\": \"zh-CN,zh;q=0.9,zh-TW;q=0.8,en-US;q=0.7,en;q=0.6\", \n",
    "    \"Host\": \"httpbin.org\", \n",
    "    \"Upgrade-Insecure-Requests\": \"1\", \n",
    "    \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36\", \n",
    "    \"X-Amzn-Trace-Id\": \"Root=1-61adb9cb-39bbbe865d5b93631b59b37b\"\n",
    "  }, \n",
    "  \"origin\": \"61.242.54.193\", \n",
    "  \"url\": \"http://httpbin.org/get\"\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "10d7c416",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:27:06.922139Z",
     "start_time": "2021-12-06T07:27:06.896995Z"
    }
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'dic_test' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\ZHOUXI~1\\AppData\\Local\\Temp/ipykernel_14720/1979219602.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdic_test\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mhttpbin_get\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'headers'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'dic_test' is not defined"
     ]
    }
   ],
   "source": [
    "dic_test(httpbin_get['headers'])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8c117dc4",
   "metadata": {},
   "source": [
    "### 函数可以输入不确定个数的参数\n",
    "> 1. *args\n",
    ">>> 1. args 可以接受多个数据（单值）\n",
    ">>> 2. args 将多个数据存在一个**元组**当中，实际还是一个变量\n",
    "> 2. ** kwargs\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "7a924697",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T08:15:50.925619Z",
     "start_time": "2021-12-06T08:15:50.911461Z"
    }
   },
   "outputs": [],
   "source": [
    "def food_ingred(food,*ingreds):\n",
    "    \"\"\"食物配料单\"\"\"\n",
    "    return food,ingreds"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "b97052b2",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T08:15:52.667777Z",
     "start_time": "2021-12-06T08:15:52.647643Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "('pizza', ('mushroom', 'hamburger'))"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "food_ingred(\"pizza\",\"mushroom\",\"hamburger\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "27abf55c",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T08:17:19.715995Z",
     "start_time": "2021-12-06T08:17:19.698787Z"
    }
   },
   "outputs": [],
   "source": [
    "def person(stu_name,**stud_info):\n",
    "    \"\"\"学生个人信息完善表\"\"\"\n",
    "    return stu_name,stud_info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "5a791d62",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T08:19:04.799322Z",
     "start_time": "2021-12-06T08:19:04.789311Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "('Lihua', {'age': 18, 'job': 'student', 'address': '南方学院'})"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "person(\"Lihua\",age=18,job=\"student\",address=\"南方学院\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "ecf3f3fc",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T08:20:59.041956Z",
     "start_time": "2021-12-06T08:20:59.025851Z"
    }
   },
   "outputs": [],
   "source": [
    "def func_name(arg1,arg2,*arg,**kwargs):\n",
    "    \"\"\"考虑比较周到的函数参数\"\"\"\n",
    "    pass"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9e7efb4b",
   "metadata": {},
   "source": [
    "### 函数输出的返回值\n",
    "> 1. 返回值可以是字符串、数值、列表、字典等数据（单一值）\n",
    "> 2. 返回值是唯一的，不可以有两个（这是其他语言，如C语言、Java等）\n",
    "> 3. python可以输出多个返回值，结果会用一个元组进行封装并返回。（本质不违背函数的定义）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "81268539",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:42:57.858806Z",
     "start_time": "2021-12-06T07:42:57.843625Z"
    }
   },
   "outputs": [],
   "source": [
    "def test1_return():\n",
    "    \"\"\"测试返回值return\"\"\"\n",
    "    return \"你好\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "16211722",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:43:17.459144Z",
     "start_time": "2021-12-06T07:43:17.441037Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'你好'"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test1_return()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "96a5a2bb",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:43:42.533808Z",
     "start_time": "2021-12-06T07:43:42.527807Z"
    }
   },
   "outputs": [],
   "source": [
    "def test2_return():\n",
    "    \"\"\"测试返回值return\"\"\"\n",
    "    return 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "12667924",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:44:19.999303Z",
     "start_time": "2021-12-06T07:44:19.989308Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test2_return()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "01a8e139",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:44:45.981446Z",
     "start_time": "2021-12-06T07:44:45.973426Z"
    }
   },
   "outputs": [],
   "source": [
    "def test3_return():\n",
    "    \"\"\"测试返回值return\"\"\"\n",
    "    return [1,2,3,4]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "b0a0b4f2",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:45:09.263513Z",
     "start_time": "2021-12-06T07:45:09.249084Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 3, 4]"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test3_return()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "4a61107f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:47:33.862356Z",
     "start_time": "2021-12-06T07:47:33.857341Z"
    }
   },
   "outputs": [],
   "source": [
    "# 测试多个值\n",
    "def test_return( ):\n",
    "    \"\"\"测试返回值return\"\"\"\n",
    "    return 1,2,\"Lihua\",[1,2,3],{\"see\" : \"me\"}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "be952cdc",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-12-06T07:47:47.651483Z",
     "start_time": "2021-12-06T07:47:47.637244Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1, 2, 'Lihua', [1, 2, 3], {'see': 'me'})"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_return()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b45f3e02",
   "metadata": {},
   "source": [
    "## 函数与模块的关系"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "24e18404",
   "metadata": {},
   "source": [
    "### 模块\n",
    "> 1. 使用模块可以隐藏函数的源代码\n",
    "> 2. 使用的人不需要会底层代码（只需要会使用模块即可）\n",
    ">> 1. 必须先调用模块，才可以使用\n",
    ">>> 1. import moudle_name 直接调用整个模块，此时模块的所有函数处于备用状态，使用的方法为：moudle_name,func_name()\n",
    ">>> 2. from moudle_name import func_name,此时，仅调用模块的某一个函数，只能"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a34b6625",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-01-19T12:26:23.952894Z",
     "start_time": "2022-01-19T12:26:23.938800Z"
    }
   },
   "outputs": [],
   "source": [
    "import study"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e6601e0e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-01-19T12:26:28.482630Z",
     "start_time": "2022-01-19T12:26:28.459510Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'e', 'o'}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "study.search4vowels(\"helloworld\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f85f4fc1",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 调用模块中函数的方法二，调用模块中某一个函数\n",
    "from study import search4vowels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "393bd3de",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-01-19T12:27:07.482858Z",
     "start_time": "2022-01-19T12:27:07.465869Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['https://www.nfu.edu.cn/xydt/index.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index1.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index2.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index3.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index4.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index5.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index6.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index7.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index8.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index9.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index10.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index11.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index12.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index13.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index14.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index15.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index16.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index17.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index18.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index19.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index20.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index21.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index22.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index23.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index24.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index25.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index26.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index27.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index28.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index29.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index30.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index31.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index32.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index33.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index34.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index35.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index36.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index37.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index38.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index39.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index40.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index41.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index42.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index43.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index44.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index45.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index46.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index47.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index48.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index49.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index50.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index51.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index52.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index53.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index54.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index55.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index56.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index57.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index58.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index59.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index60.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index61.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index62.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index63.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index64.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index65.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index66.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index67.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index68.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index69.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index70.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index71.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index72.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index73.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index74.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index75.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index76.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index77.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index78.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index79.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index80.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index81.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index82.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index83.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index84.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index85.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index86.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index87.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index88.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index89.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index90.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index91.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index92.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index93.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index94.htm',\n",
       " 'https://www.nfu.edu.cn/xydt/index95.htm']"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "study.news_链接('https://www.nfu.edu.cn/','xydt','96')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "998118ff",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "280.741px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
